package com.smartEdu.module.thrift.common;

import org.apache.thrift.TServiceClient;
import org.apache.thrift.transport.TTransportException;
import com.smartEdu.module.thrift.common.ThriftClient.TClientParam;

public abstract class BaseTClient {
	protected ThriftClient client;
	public abstract void initParams(TClientParam param);
	protected <T extends TServiceClient> T getTClient(Class<T> cls) {
		return client.getSyncClient(cls);
	}
	public void open() throws TTransportException {
		client.open();
	}
	public void close() {
		client.close();
	}
}
